<template>
    <div class="main">
        <div class="type">
            <span>请选择线索类型</span>
        </div>
        <div class="list"  v-for="(item,index) in data" 
            @click="getSecondTypeList(item)"
            :key="index">
            <div class="title">
            {{item.TypeName}}
            </div>
              <img class="icon" src="@/assets/Images/AppIcon/icon_arrow_right.png" />
        </div>
    </div>
</template>

<script>
import store from "@/store/index";
export default {
	data() {
		return {
			data: {},
            Info:this.$route.query.Info,
		}
	},
	created() {
        this.ListGroupName();
        if(process.env.VUE_APP_COMPANYCODE!="00031"){

store.state.title="码上学"
}
	},

	methods: {
        
        // 获取一级上报类型
        ListGroupName(){
            var self = this;
            this.$axios.get('/ChsClueType/GetClueList').then((res) => {
                self.data = res.data;
            });
        },

        // 点击跳转第二级上报类型
        getSecondTypeList(item){
            this.$router.push({
                path: "/qtyjReport/SecondType",
                query: { 
                    Info:this.Info,
                    TypeCode:item.TypeCode,
                    TypeName:item.TypeName,
                },
            });
        }
	},
}
</script>

<style lang="less" scoped>
.main{
    font-size: 14px;
}
.list{
    display:flex;
    justify-content:space-between;
    background-color: white;
    border-bottom: 1px solid #cccccc;
    padding:10px;
    align-items: center;


}
.title{
    padding-right:10px;
    white-space: nowrap;
    overflow : hidden;
    text-overflow: ellipsis;
}
img{
    width: 15px;
    height: 15px;
}
.type{
    padding: 10px;
}
</style>
